# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=facile
pkgver=1.1.4
pkgrel=5
pkgdesc="A Functional Constraint Library"
arch=(loong64 x86_64)
url="http://www.recherche.enac.fr/opti/facile/"
license=("LGPL")
depends=('ocaml')
makedepends=('ocaml-compiler-libs')
source=(https://github.com/Emmanuel-PLF/facile/archive/$pkgver/$pkgname-$pkgver.tar.gz ocaml5.patch)
sha256sums=('f35cbc3c8022120c01a7b3844b279f032f37856bff1c9801c410f2520e786502'
            '57d511db86373dd7ef3732fa09c7d6f24c03105873e1c01392f98b0212993a80')


prepare() {
  cd $pkgname-$pkgver/lib
  patch -Np1 -i ../../ocaml5.patch
}



build() {
  cd $pkgname-$pkgver/lib
  make
}

package() {
  cd $pkgname-$pkgver/lib
  install -Dm644 facile.cmxa facile.cmi facile.cma facile.a -t "$pkgdir/usr/lib/ocaml/facile"
}
